<html manifest="IGNORE.manifest" lang="zh-CN" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3">
<!DOCTYPE html>
<html manifest="IGNORE.manifest" lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate" />
    <meta http-equiv="Pragma" content="no-cache" />
    <meta http-equiv="Expires" content="0" />
    <title>木窗类</title>
    <link rel="stylesheet" type="text/css" href="../css/reset.css" th:href="@{${uiPath} + ${appName} +'/css/reset.css?v=20171220'}"/>
    <link rel="stylesheet" type="text/css" href="../css/cl.css" th:href="@{${uiPath} + ${appName} + '/css/cl.css?v=20171220'}"/>
    <link rel="stylesheet" type="text/css" href="../css/zdialog.css" th:href="@{${uiPath} + ${appName} + '/css/zdialog.css?v=20171220'}"/>
    <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js" th:src="'http://res.wx.qq.com/open/js/jweixin-1.2.0.js'"></script>

</head>
<body>
<div id="yezhushapixiang" class="zong bendishangjia">
    <div class="toubu">
        <a href=""><img class="fanhui" src="../images/raw_1503386635.png" th:src="@{${uiPath} + ${appName} +'/images/raw_1503386635.png'}" alt=""></a>
        <p class="bitoati">木窗类</p>
        <a href="">
            <p class="shouye">首页</p>
        </a>
    </div>
    <div class="kuai"> </div>

    <div class="saixuan eeee">
        <div class="goodslists">
            <p class="liebiao">商品列表</p>
            <a th:onclick="'qiehuan(1)'">
            <p class="xiaoliang" >销量</p>
            <img class="xiala4" src="../images/raw_1503289656.png" alt="" th:src="@{${uiPath} + ${appName} + '/images/raw_1503289656.png'}">
            </a>
            <a th:onclick="'qiehuan(0)'">
            <p class="julikm">距离</p>
            <img class="xiala3" src="../images/raw_1503289656.png" alt="" th:src="@{${uiPath} + ${appName} + '/images/raw_1503289656.png'}">
            </a>

        </div>

        <div class="spzshi" >

    <!--        <a href="../CLS/CLS_SGShopXq.html" th:each="goods,goosStat:${result}" th:href="@{'/materialGoodsIndex/shopXq?goodsId='+${goods.goodsId}}">
                <div class="renwuliebiao">
                    <dl class="jianjiansha">
                        <dt class="adtouxiang">
                            <img id="imgg0" src="../images/raw_1503387359.jpeg" th:src="${goods.model.imgUrl}">
                        </dt>
                        <dd class="renwuxinxi">
                            <p class="name" th:utext="${goods.goodsName}">黄金沙</p>
                            <p class="addkucun" >库存量:<span th:utext="${goods.amount}">200000</span></p>
                            <p class="anlishu">销量:<span th:utext="${goods.sales}">0</span> 万</p>
                            <p class="phone" th:utext="'￥'+${goods.model.price}">￥25</p>
                            <p class="anlishu">距离您:<span th:utext="${goods.distanceKm}+'千米'">0</span> </p>

                        </dd>
                        <dd class="addright">
                            <p class="weikaiqipd"></p>
                            <p class="rightt"></p>
                        </dd>
                    </dl>
                </div>
            </a>-->
        </div>
        <div class="spzshi1" style="display: none">
            <a href="../CLS/CLS_SGShopXq.html" th:each="goods,goosStat:${result}" th:href="@{'/materialGoodsIndex/shopXq?goodsId='+${goods.goodsId}}">
                <div class="renwuliebiao">
                    <dl class="jianjiansha">
                        <dt class="adtouxiang">
                            <img id="imgg0" src="../images/raw_1503387359.jpeg" th:src="${goods.model.imgUrl}">
                        </dt>
                        <dd class="renwuxinxi">
                            <p class="name" th:utext="${goods.goodsName}">黄金沙</p>
                            <p class="addkucun" >库存量:<span th:utext="${goods.amount}">200000</span></p>
                            <p class="anlishu">销量:<span th:utext="${goods.sales}">0</span> 万</p>
                            <p class="phone" th:utext="'￥'+${goods.model.price}">￥25</p>
                            <p class="anlishu">距离您:<span th:utext="${goods.distanceKm}+'千米'">0</span> </p>

                        </dd>
                        <dd class="addright">
                            <p class="weikaiqipd"></p>
                            <p class="rightt"></p>
                        </dd>
                    </dl>
                </div>
            </a>
        </div>
        <div class="loadingd" STYLE="display: none">
            <p class="loadding">加载中</p>
        </div>
    </div>


</div>
<div class="fenye" style="display: none">

    <input type="hidden" th:value="${ye}" id="zongye">
    <input type="hidden" th:value="${total}" id="zongtiaoshu">
    <input type="hidden" th:value="${smallId}" id="smallId">

</div>
<form id="commentForm" th:action="@{'/materialGoodsIndex/nextPage'}" method="post">
</form>
<form id="getGoodsSlas" th:action="@{'/materialGoodsIndex/getGoodsSlas'}" method="post">
</form>
<script type="text/javascript" src="../js/flexible.js" th:src="@{${uiPath} + ${appName} + '/js/flexible.js?v=20171220'}"></script>
<script type="text/javascript" src="../js/jquery.min.js" th:src="@{${uiPath} + ${appName} + '/js/jquery.min.js?v=20171220'}"></script>

<!-- <script type="text/javascript" src="../js/basevalue.js"></script> -->
<script type="text/javascript" src="../js/zdialog.js" th:src="@{${uiPath} + ${appName} + '/js/zdialog.js?v=20171222'}"></script>

<script type="text/javascript" src="../js/CLSRZ.js" th:src="@{${uiPath} + ${appName} + '/js/CLSRZ.js?v=20171220'}"></script>

<script th:inline="javascript">
    //文档高度
    var id=[[${smallId}]];
    var distanceType=0;

    var qiehuanType=0;
    var data="";
    var ye=0;
    var zongye=$('#zongye').val();
    var yeshu=0;
    var tiaoshu=4;
    var zongtiaoshu=$('#zongtiaoshu').val();

    var accuracy = "";
    if(qiehuanType==0){
        $(document).ready(function(){
            $.DialogByZ.Loading(/*[[${uiPath}+${appName}+'/images/loading.png']]*/);

            $.ajax({
                url:"/materialGoodsIndex/getdistanceGoods",
                dataType:"json",
                type:'post',
                data:{"id":id,"distanceType":distanceType},
                success:function (result) {
                    $.DialogByZ.Close();
                    distanceType=result.data.distanceType+1;

                    if(result.code==1){

                        if(data.toString()==result.data.list.toString()){
                            data=result.data.list.toString();
                        }else{
                            if(result.data.list.length!=0){
                                var data1=result.data.list;
                                $('.spzshi').empty();

                                for(var i=0;i<data1.length;i++){

                                    var a= $("<a href='/materialGoodsIndex/shopXq?goodsId=" + data1[i].goodsId + "' </a>");
                                    var div = $("<div class='renwuliebiao'> </div>");
                                    var dl=$("<dl class='jianjiansha'></dl>");
                                    var dt=$("<dt class='adtouxiang'></dt>");
                                    var img ="<img  id='imgg0' src='" + data1[i].model.imgUrl + "'>"
                                    var dd="<dd class='renwuxinxi'><p class='name'>"+ data1[i].goodsName+"</p><p class='addkucun'>库存量：<span>"+data1[i].amount+"</span></p><p class='anlishu'>销量:<span>"+data1[i].sales+"</span></p><p class='phone'>￥"+data1[i].model.price+"</p><p class='anlishu'>距离您:<span>"+data1[i].distanceKm+"千米</span></p></dd>   <dd class='addright'><p class='weikaiqipd'></p> <p class='rightt'></p></dd>";
                                    dt.append(img);
                                    dl.append(dt);
                                    dl.append(dd);
                                    div.append(dl);
                                    a.append(div);
                                    $('.spzshi').append(a);
                                }
                                data=result.data.list.toString();

                            }else{

                            }
                        }
                        $('.loadingd').show();

                    }
                    else{
                    }

                }

            })
        });
    }






    function getDocumentTop() {

        var scrollTop = 0, bodyScrollTop = 0, documentScrollTop = 0;

        if (document.body) {

            bodyScrollTop = document.body.scrollTop;

        }

        if (document.documentElement) {

            documentScrollTop = document.documentElement.scrollTop;

        }

        scrollTop = (bodyScrollTop - documentScrollTop > 0) ? bodyScrollTop : documentScrollTop;    return scrollTop;

    }



    //可视窗口高度

    function getWindowHeight() {

        var windowHeight = 0;    if (document.compatMode == "CSS1Compat") {

            windowHeight = document.documentElement.clientHeight;

        } else {

            windowHeight = document.body.clientHeight;

        }

        return windowHeight;

    }



    //滚动条滚动高度

    function getScrollHeight() {

        var scrollHeight = 0, bodyScrollHeight = 0, documentScrollHeight = 0;

        if (document.body) {

            bodyScrollHeight = document.body.scrollHeight;

        }

        if (document.documentElement) {

            documentScrollHeight = document.documentElement.scrollHeight;

        }

        scrollHeight = (bodyScrollHeight - documentScrollHeight > 0) ? bodyScrollHeight : documentScrollHeight;    return scrollHeight;

    }
    window.onscroll = function () {

        //监听事件内容

        if(getScrollHeight() == getWindowHeight() + getDocumentTop()){

            //当滚动条到底时,这里是触发内容

            //异步请求数据,局部刷新dom
     /*       var p = " <div class=\"loadingd\">\n" +
                "                <p class=\"loadding\">加载中</p>\n" +
                "                </div>"

            $('.spzshi').append(p);*/
                    if(qiehuanType==0){
                $.ajax({
                        url:"/materialGoodsIndex/getdistanceGoods",
                        dataType:"json",
                        type:'post',
                        data:{"id":id,"distanceType":distanceType+1},
                        success:function (result) {
                            distanceType=result.data.distanceType;

                            if(result.code==1){
                                if(data.toString()==result.data.list.toString()){
                                                data=result.data.list.toString();
/*
                                    $('.loadingd').hide();
*/

                                }else{
                                    if(result.data.list.length!=0){
                                      var data1=result.data.list;
                                        $('.spzshi').empty();

                                        for(var i=0;i<data1.length;i++){

                                            var a= $("<a href='/materialGoodsIndex/shopXq?goodsId=" + data1[i].goodsId + "' </a>");
                                            var div = $("<div class='renwuliebiao'> </div>");
                                            var dl=$("<dl class='jianjiansha'></dl>");
                                            var dt=$("<dt class='adtouxiang'></dt>");
                                            var img ="<img  id='imgg0' src='" + data1[i].model.imgUrl + "'>"
                                            var dd="<dd class='renwuxinxi'><p class='name'>"+ data1[i].goodsName+"</p><p class='addkucun'>库存量：<span>"+data1[i].amount+"</span></p><p class='anlishu'>销量:<span>"+data1[i].sales+"</span></p><p class='phone'>￥"+data1[i].model.price+"</p><p class='anlishu'>距离您:<span>"+data1[i].distanceKm+"千米</span></p></dd>   <dd class='addright'><p class='weikaiqipd'></p> <p class='rightt'></p></dd>";
                                            dt.append(img);
                                            dl.append(dt);
                                            dl.append(dd);
                                            div.append(dl);
                                            a.append(div);
                                            $('.spzshi').append(a);
                                        }
                                        data=result.data.list.toString();

                                    }else{
                                        $('.loadingd').hide();

                                    }
                                }
                                }
                              else{
                                alert(result.data);
                            }
                            
                        }
                    
                })
                    }else{

                        var b= Math.ceil(zongtiaoshu/3);
                        if(ye==b){
                            $.DialogByZ.Close();
                            $.DialogByZ.Alert({Title: "失败", Content: "已经是最后一页了哦", BtnL: "确定"})
                        }else{
                            $.ajax({
                                    type:'post',
                                    url: $('#commentForm').attr('action'),
                                    dataType: 'json',
                                    data:{'lng':lng,'lat':lat,'limit':tiaoshu,'offset':yeshu+4,'order':'asc','id':id},
                                    success:function (result) {
                                        console.info(result);
                                        if (result.code == 1) {
                                            if (result.data.length != 0) {
                                                console.info(result.data);
                                                var data2 = result.data;
                                                var tol = "";
                                                $('.spzshi').hide();

                                                for (var i in data2) {
                                                    tol = tol + "<a href='/materialGoodsIndex/shopXq?goodsId" + data2[i].id + "'>" + "<div class='renwuliebiao'>" + "<dl class='jianjiansha'>" + "<dt class='adtouxiang'>" + "<img src='" + data2[i].model.imgUrl + "'>" + "</dt>" + "<dd class='renwuxinxi'>" + "<p class='name'>" + data2[i].goodsName + "</p>" + "<p class='addkucun'>" + "库存量" + "<span>" + data2[i].amount + "</span>" + "</p>" + "<p class='anlishu'>" + "销量" + "<span>" + data2[i].sales + "</span>" + "</p>" + "<p class='phone'>" + "￥" + data2[i].model.price + "</p>" + "<p class='anlishu'>距离您:<span>" + data2[i].distanceKm + "千米</span></p>" + "</dd>" + "</dl>" + "</div>" + "</a>"
                                                }
                                                console.info(tol);

                                                $('.spzshi1').append(tol);
                                                $('#ye').html(ye + 1 + "/" + zongye);
                                                ye++;
                                                yeshu = yeshu + 4;
                                                $.DialogByZ.Close();

                                            } else {
                                                $('.loadingd').hide();
                                            }

                                        }
                                    }

                                }


                            )
                        }
                    }
                }

    }
    //合并两个数组，去重
    var concat_ = function(arr1,arr2){
        //不要直接使用var arr = arr1，这样arr只是arr1的一个引用，两者的修改会互相影响
        var arr = arr1.concat();
        //或者使用slice()复制，var arr = arr1.slice(0)
        for(var i=0;i<arr2.length;i++){
            arr.indexOf(arr2[i]) === -1 ? arr.push(arr2[i]) : 0;
        }
        return arr;
    }

    //合并多个数组，去重
    var concat = function(arr1,arr2,arr3){
        if(arguments.length <= 1){
            return false;
        }
        var concat_ = function(arr1,arr2){
            var arr = arr1.concat();
            for(var i=0;i<arr2.length;i++){
                arr.indexOf(arr2[i]) === -1 ? arr.push(arr2[i]) : 0;
            }
            return arr;
        }
        var result = concat_(arr1,arr2);
        for(var i=2;i<arguments.length;i++){
            result = concat_(result,arguments[i]);
        }
        return result;
    }

   /*  var ye=1;
       var zongye=$('#zongye').val();
       var yeshu=0;
       var tiaoshu=3;
       var zongtiaoshu=$('#zongtiaoshu').val();
       var id=$('#smallId').val();
       function pageNext(){




       }
       function pagePre(){
           var y=yeshu-3;
           if(ye==1){
               $.DialogByZ.Alert({Title: "失败", Content: "已经是第一页了哦", BtnL: "确定"})
           }else{
               $.ajax({
                       type:'post',
                       url: $('#commentForm').attr('action'),
                       dataType: 'json',
                       data:{'limit':tiaoshu,'offset':y,'order':'asc','id':id},
                       success:function (result) {
                           console.info(result);
                           if (result.code == 1) {
                               console.info(result.data);
                               var data2=result.data;
                               var tol ="";
                               $('.spzshi').hide();
                               var div= $("<div class='spzshi'> </div>");
                               for(var i in data2){
                                   if(data2[i].isOpenpin==1){
                                       tol =tol+ "<a href='/materialGoodsIndex/shopXq?goodsId" +data2[i].id+"'>"+"<div class='renwuliebiao'>"+"<dl class='jianjiansha'>"+"<dt class='adtouxiang'>"+"<img src='"+data2[i].model.imgUrl+"'>"+"</dt>"+"<dd class='renwuxinxi'>"+"<p class='name'>"+data2[i].goodsName+"</p>"+"<p class='addkucun'>"+"库存量"+"<span>"+data2[i].amount+"</span>"+"</p>"+"<p class='anlishu'>"+"销量"+"<span>"+data2[i].sales+"</span>"+"</p>"+"<p class='linian'>"+"配送费"+"<span>"+data2[i].sendPrice+"/公里"+"</span>"+"</p>"+"<p class='phone'>"+"￥"+data2[i].model.price+"</p>"+"</dd>"+"<dd class='addright'>"+"<p class='yikaiqipd'>"+"已开启拼单"+"</p>"+"<p class='rightt'>"+"</p>"+"</dd>"+"</dl>"+"</div>"+ "</a>"
                                   }else{
                                       tol =tol+ "<a href='/materialGoodsIndex/shopXq?goodsId" +data2[i].id+"'>"+"<div class='renwuliebiao'>"+"<dl class='jianjiansha'>"+"<dt class='adtouxiang'>"+"<img src='"+data2[i].model.imgUrl+"'>"+"</dt>"+"<dd class='renwuxinxi'>"+"<p class='name'>"+data2[i].goodsName+"</p>"+"<p class='addkucun'>"+"库存量"+"<span>"+data2[i].amount+"</span>"+"</p>"+"<p class='anlishu'>"+"销量"+"<span>"+data2[i].sales+"</span>"+"</p>"+"<p class='linian'>"+"配送费"+"<span>"+data2[i].sendPrice+"/公里"+"</span>"+"</p>"+"<p class='phone'>"+"￥"+data2[i].model.price+"</p>"+"</dd>"+"</dl>"+"</div>"+ "</a>"

                                   }                            }
                               console.info(tol);
                               div.append(tol);
                               $('.saixuan').append(div);
                               $('#ye').html(ye-1+"/"+zongye);
                               ye--;
                               yeshu=yeshu-3;
                               $.DialogByZ.Close();

                           }

                       }


                   }


               )

           }


       }
       function pageShouye(){
           $.ajax({
                   type:'post',
                   url: $('#commentForm').attr('action'),
                   dataType: 'json',
                   data:{'limit':tiaoshu,'offset':0,'order':'asc','id':id},
                   success:function (result) {
                       console.info(result);
                       if (result.code == 1) {
                           console.info(result.data);
                           var data2=result.data;
                           var tol ="";
                           $('.spzshi').hide();
                           var div= $("<div class='spzshi'> </div>");
                           for(var i in data2){
                               if(data2[i].isOpenpin==1){
                                   tol =tol+ "<a href='/materialGoodsIndex/shopXq?goodsId" +data2[i].id+"'>"+"<div class='renwuliebiao'>"+"<dl class='jianjiansha'>"+"<dt class='adtouxiang'>"+"<img src='"+data2[i].model.imgUrl+"'>"+"</dt>"+"<dd class='renwuxinxi'>"+"<p class='name'>"+data2[i].goodsName+"</p>"+"<p class='addkucun'>"+"库存量"+"<span>"+data2[i].amount+"</span>"+"</p>"+"<p class='anlishu'>"+"销量"+"<span>"+data2[i].sales+"</span>"+"</p>"+"</p>"+"<p class='phone'>"+"￥"+data2[i].model.price+"</p>"+"</dd>"+"<dd class='addright'>"+"<p class='yikaiqipd'>"+"已开启拼单"+"</p>"+"<p class='rightt'>"+"</p>"+"</dd>"+"</dl>"+"</div>"+ "</a>"
                               }else{
                                   tol =tol+ "<a href='/materialGoodsIndex/shopXq?goodsId" +data2[i].id+"'>"+"<div class='renwuliebiao'>"+"<dl class='jianjiansha'>"+"<dt class='adtouxiang'>"+"<img src='"+data2[i].model.imgUrl+"'>"+"</dt>"+"<dd class='renwuxinxi'>"+"<p class='name'>"+data2[i].goodsName+"</p>"+"<p class='addkucun'>"+"库存量"+"<span>"+data2[i].amount+"</span>"+"</p>"+"<p class='anlishu'>"+"销量"+"<span>"+data2[i].sales+"</span>"+"</p>"+"</p>"+"<p class='phone'>"+"￥"+data2[i].model.price+"</p>"+"</dd>"+"</dl>"+"</div>"+ "</a>"

                               }                        }
                           console.info(tol);
                           div.append(tol);
                           $('.saixuan').append(div);
                           $('#ye').html("1/"+zongye);
                           ye=1;
                           yeshu=0;
                           $.DialogByZ.Close();

                       }

                   }


               }


           )
       }
       function pageWeiYe(){
           var b="";
           if(zongtiaoshu%3==0){
               alert("zhengshu")

               b=zongtiaoshu-3
           }
           else{
               alert("yushu")
               var a= parseInt(zongtiaoshu/3);
               b=a*3;

           }
           $.ajax({
                   type:'post',
                   url: $('#commentForm').attr('action'),
                   dataType: 'json',
                   data:{'limit':tiaoshu,'offset':b,'order':'asc','id':id},
                   success:function (result) {
                       console.info(result);
                       if (result.code == 1) {
                           console.info(result.data);
                           var data2=result.data;
                           var tol ="";
                           $('.spzshi').hide();
                           var div= $("<div class='spzshi'> </div>");
                           for(var i in data2){
                               if(data2[i].isOpenpin==1){
                                   tol =tol+ "<a href='/materialGoodsIndex/shopXq?goodsId" +data2[i].id+"'>"+"<div class='renwuliebiao'>"+"<dl class='jianjiansha'>"+"<dt class='adtouxiang'>"+"<img src='"+data2[i].model.imgUrl+"'>"+"</dt>"+"<dd class='renwuxinxi'>"+"<p class='name'>"+data2[i].goodsName+"</p>"+"<p class='addkucun'>"+"库存量"+"<span>"+data2[i].amount+"</span>"+"</p>"+"<p class='anlishu'>"+"销量"+"<span>"+data2[i].sales+"</span>"+"</p>"+"<p class='phone'>"+"￥"+data2[i].model.price+"</p>"+"</dd>"+"<dd class='addright'>"+"<p class='yikaiqipd'>"+"已开启拼单"+"</p>"+"<p class='rightt'>"+"</p>"+"</dd>"+"</dl>"+"</div>"+ "</a>"
                               }else{
                                   tol =tol+ "<a href='/materialGoodsIndex/shopXq?goodsId" +data2[i].id+"'>"+"<div class='renwuliebiao'>"+"<dl class='jianjiansha'>"+"<dt class='adtouxiang'>"+"<img src='"+data2[i].model.imgUrl+"'>"+"</dt>"+"<dd class='renwuxinxi'>"+"<p class='name'>"+data2[i].goodsName+"</p>"+"<p class='addkucun'>"+"库存量"+"<span>"+data2[i].amount+"</span>"+"</p>"+"<p class='anlishu'>"+"销量"+"<span>"+data2[i].sales+"</span>"+"</p>"+"</p>"+"<p class='phone'>"+"￥"+data2[i].model.price+"</p>"+"</dd>"+"</dl>"+"</div>"+ "</a>"

                               }                        }
                           console.info(tol);
                           div.append(tol);
                           $('.saixuan').append(div);
                           $('#ye').html(Math.ceil(zongtiaoshu/3)+"/"+zongye);
                           ye= Math.ceil(zongtiaoshu/3);
                           yeshu=b;
                           $.DialogByZ.Close();

                       }

                   }


               }


           )
       }*/
    $('.xiaoliang').click(function(){
        $('.xiaoliang').css({
            color:'#f30'
        })
        $('.julikm').css({
            color:'#000'
        })
    })

    $('.julikm').click(function(){

        $('.xiaoliang').css({
            color:'#000'
        })
        $('.julikm').css({
            color:'#f30'
        })
    })
    function  qiehuan(id) {
    if(id==0){
        qiehuanType=0;

        $('.spzshi1').hide();
        $('.spzshi').show();
        $('.loadingd').show();

    }
    else{
        qiehuanType=1;
        $('.spzshi').hide();
        $('.spzshi1').show();
        $('.loadingd').show();

        $.DialogByZ.Loading(/*[[${uiPath}+${appName}+'/images/loading.png']]*/);

        var b= Math.ceil(zongtiaoshu/3);
        if(ye==b){
            $.DialogByZ.Close();
            $.DialogByZ.Alert({Title: "失败", Content: "已经是最后一页了哦", BtnL: "确定"})
        }else{
            $.ajax({
                    type:'post',
                    url: "/materialGoodsIndex/getGoodsSlas",
                    dataType: 'json',
                    data:{'lng':lng,'lat':lat,'limit':tiaoshu,'offset':yeshu+4,'order':'asc','id':id},
                    success:function (result) {
                        console.info(result);
                        if (result.code == 1) {
                            console.info(result.data);
                            var data2=result.data.result;
                            var tol ="";
                            $('.spzshi').hide();

                            for(var i in data2){
                                tol =tol+ "<a href='/materialGoodsIndex/shopXq?goodsId" +data2[i].id+"'>"+"<div class='renwuliebiao'>"+"<dl class='jianjiansha'>"+"<dt class='adtouxiang'>"+"<img src='"+data2[i].model.imgUrl+"'>"+"</dt>"+"<dd class='renwuxinxi'>"+"<p class='name'>"+data2[i].goodsName+"</p>"+"<p class='addkucun'>"+"库存量"+"<span>"+data2[i].amount+"</span>"+"</p>"+"<p class='anlishu'>"+"销量"+"<span>"+data2[i].sales+"</span>"+"</p>"+"<p class='phone'>"+"￥"+data2[i].model.price+"</p>"+"<p class='anlishu'>距离您:<span>"+data2[i].distanceKm+"千米</span></p>"+"</dd>"+"</dl>"+"</div>"+ "</a>"
                            }
                            console.info(tol);

                            $('.spzshi1').append(tol);
                            ye++;
                            yeshu=yeshu+4;
                            $.DialogByZ.Close();

                        }

                    }


                }


            )
        }

    }

    }
</script>

</body>
</html>